#!/bin/bash
# Date : 2018 08 14
# Author: ljwnet163@163.com

res=`seq -s " " 10`
# echo ${#res}
# echo $res | wc -m
# echo $(expr length "$res")

time for i in $(seq 3000);do count=${#res};done;
# real    0m0.016s
# user    0m0.014s
# sys     0m0.002s
# time for i in $(seq 3000);do count=`echo $res | wc -m`;done;
# real    0m14.239s
# user    0m9.359s
# sys     0m8.301s
# time for i in $(seq 3000);do count=$(expr length "$res");done;
# real    0m11.123s
# user    0m5.920s
# sys     0m5.084s